package com.mayikt.member.mapper;

import com.mayikt.member.mapper.entity.UserToken;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Vince-zz
 * @since 2020-03-01
 */
@Component
public interface UserTokenMapper extends BaseMapper<UserToken> {
    UserToken selectByUserIdAndLoginTypeAndAvailable(@Param("userId") Long id, @Param("loginType") String loginType, @Param("available") Integer available);
    int updateAvailableByUserIdAndLoginType(@Param("userId") Long id, @Param("loginType") String loginType, @Param("available") Integer available);
    int updateAvailableByToken(@Param("token")String token, @Param("available") Integer available);
}
